const {
  MYSQL_HOST,
  MYSQL_PORT,
  MYSQL_USER,
  MYSQL_PWD,
  MYSQL_DB
  
} = require("../config/config.default")

const { Sequelize }  = require("sequelize")

const seq = new Sequelize(MYSQL_DB,MYSQL_USER,MYSQL_PWD,{
  host:MYSQL_HOST,
  port:MYSQL_PORT,
  dialect:'mysql'
})

// try {
//   seq.authenticate();
//   console.log('Connection has been established successfully.');
// } catch (error) {
//   console.error('Unable to connect to the database:', error);
// }

module.exports = seq